1. Field of the Invention
The present invention relates to a processing system, and more particularly to a processing system capable of directly updating firmware stored in a non-volatile memory according to a protocol between a serial port and the non-volatile memory without utilizing a processor.
2. Description of the Prior Art
Because data stored in a non-volatile memory will not be lost after its electric power is cut off, the non-volatile memory is a very important component in a computer system for storing system data, i.e. firmware. Firmware of a processing system, thus, is usually stored in a non-volatile memory so that the processing system can operate regularly after it is turned on.
Please refer to FIG. 1 that is a functional block diagram of a processing system 10 connected to a computer 20 according to the prior art. The processing system 10 comprises a non-volatile memory (NVM) 12 and a NVM control interface 14. The NVM control interface 14 comprises a plurality of registers for updating and accessing data stored in the NVM 12. The processing system 10 further comprising a processor 16 and a serial port interface 18 electrically connected to a computer 20 via a serial port 22. The processor 16 is used to control operations of the processing system 10 and is electrically connected to the NVM control interface 14 to use the NVM control interface 14 to update the data stored in the NVM 12. The processor 16 is also electrically connected to the serial port interface 18 to use the serial port interface 18 to exchange data with the computer 20 by processing data conversion between serial data bits and data bytes.
During the update of the firmware, the processor 16 must be used to process the update data, i.e. the data used to update the firmware. Moreover, before the processor 16 updates the firmware stored in the NVM 12, some program code stored in the NVM 12, which is necessary for the processor 16, must be stored in another memory, such as a built-in static random access memory (SRAM), or a part of the NVM 12 must be isolated to store the program code.
However, using the SRAM to store the program codes increases the cost of the processing system, and isolating the part of the NVM to store the program codes makes the update of the entire NVM 12 impossible. Furthermore, when the processor 16 is used to update the firmware, a cyclic redundancy check (CRC) method is used to check the data to ensure the correction of updated firmware. However, the correction of updated firmware cannot be guaranteed using the CRC method and it is time-consuming to process a high-accuracy CRC.